﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>JS Loops Exercise 1</title>
    <link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
    <h1>Prints all the numbers from 1 to N</h1>
    <label for="inpNum">N:</label>
    <input type="text" id="inpNum"/>
    <button onclick="execute()">Execute</button>
    <div id="js-console"></div>
    <script src="scripts/js-console.js"></script>
    <script>
        function execute()
        {
            var N = jsConsole.readInteger("#inpNum");
            
            for (var i = 1; i <= N; i++)
            {
                jsConsole.writeLine(i);
            }
        }
    </script>
</body>
</html>
